package cn.edu.scau.cmi.wurihua.abstractFactory;

import cn.edu.scau.cmi.wurihua.factory.pojo.Beef;
import cn.edu.scau.cmi.wurihua.factory.pojo.Chicken;
import cn.edu.scau.cmi.wurihua.factory.pojo.Meat;
import cn.edu.scau.cmi.wurihua.factory.pojo.Pork;

public abstract class AbstractFactory {
		
	public static Meat produceMeat(String kindOfMeat) {
		if(kindOfMeat.equals("pork")) {
			return new Pork();
		}
		if(kindOfMeat.equals("beef")) {
			return new Beef();
		}
		if(kindOfMeat.equals("chicken")) {
			return new Chicken();
		}
		else {
			Meat meat = new Meat(kindOfMeat);
			return meat;
		}
	}
}
